<div n:foreach="$foo as $bar">
<div>
{if true}
{$var}
{else}
{$foo}
{/if}
</div>
</div>